﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DomainModel;
using BL;

namespace SL
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service4" in code, svc and config file together.
    public class SLOrderItems : ISLOrderItems
    {
        //InsertOrderItems
        public void InsertOrderItems(OrderItem item, ref List<string> errors)
        {
            BLOrders.InsertOrderItems(item, ref errors);
        }

        //numOrderItems
        public int NumOrderItems(ref List<string> errors)
        {
            return BLOrders.NumOrderItems(ref errors);
        }

        //SeeMyHistory
        public List<OrderItem> SeeMyHistory(int id, ref List<string> errors)
        {
            return BLOrders.SeeMyHistory(id, ref errors);
        }

        public void DeleteOrderItem(int oid, int pid, ref List<string> errors)
        {
            BLOrders.DeleteOrderItem(oid, pid, ref errors);
        }

        public void ClearOrderItems(int oid, ref List<string> errors)
        {
            BLOrders.ClearOrderItems(oid, ref errors);
        }

        public List<OrderItem> GetOrderProducts(int id, ref List<string> errors)
        {
            return BLOrders.GetOrderProducts(id, ref errors);
        }
    }
}
